3.4.40 \(\int \frac {x \log (c (d+e x^2)^p)}{f+g x^2} \, dx\) [340]

Optimal. Leaf size=70 \[ \frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}+\frac {p \text {Li}_2\left (-\frac {g \left (d+e x^2\right )}{e f-d g}\right )}{2 g} \]

[Out]

1/2*ln(c*(e*x^2+d)^p)*ln(e*(g*x^2+f)/(-d*g+e*f))/g+1/2*p*polylog(2,-g*(e*x^2+d)/(-d*g+e*f))/g

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2525, 2441, 2440, 2438} \begin {gather*} \frac {p \text {PolyLog}\left (2,-\frac {g \left (d+e x^2\right )}{e f-d g}\right )}{2 g}+\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*Log[c*(d + e*x^2)^p])/(f + g*x^2),x]

[Out]

(Log[c*(d + e*x^2)^p]*Log[(e*(f + g*x^2))/(e*f - d*g)])/(2*g) + (p*PolyLog[2, -((g*(d + e*x^2))/(e*f - d*g))])
/(2*g)

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2440

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + c*e*(x/g)])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2525

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rubi steps

\begin {align*} \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx &=\frac {1}{2} \text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{f+g x} \, dx,x,x^2\right )\\ &=\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}-\frac {(e p) \text {Subst}\left (\int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx,x,x^2\right )}{2 g}\\ &=\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}-\frac {p \text {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x^2\right )}{2 g}\\ &=\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}+\frac {p \text {Li}_2\left (-\frac {g \left (d+e x^2\right )}{e f-d g}\right )}{2 g}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 64, normalized size = 0.91 \begin {gather*} \frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )+p \text {Li}_2\left (\frac {g \left (d+e x^2\right )}{-e f+d g}\right )}{2 g} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*Log[c*(d + e*x^2)^p])/(f + g*x^2),x]

[Out]

(Log[c*(d + e*x^2)^p]*Log[(e*(f + g*x^2))/(e*f - d*g)] + p*PolyLog[2, (g*(d + e*x^2))/(-(e*f) + d*g)])/(2*g)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.37, size = 472, normalized size = 6.74

method result size
risch \(\frac {\ln \left (g \,x^{2}+f \right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )}{2 g}-\frac {p \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\RootOf \left (e \,\textit {\_Z}^{2}+d \right )}{\sum }\left (\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \ln \left (g \,x^{2}+f \right )-\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \left (\ln \left (\frac {\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =1\right )}\right )+\ln \left (\frac {\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =2\right )}\right )\right )-\dilog \left (\frac {\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =1\right )}\right )-\dilog \left (\frac {\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\RootOf \left (e \,\textit {\_Z}^{2} g +2 \textit {\_Z} \underline {\hspace {1.25 ex}}\alpha g e -d g +e f , \mathit {index} =2\right )}\right )\right )\right )}{2 g}+\frac {i \ln \left (g \,x^{2}+f \right ) \pi \,\mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}}{4 g}-\frac {i \ln \left (g \,x^{2}+f \right ) \pi \,\mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \right )}{4 g}-\frac {i \ln \left (g \,x^{2}+f \right ) \pi \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3}}{4 g}+\frac {i \ln \left (g \,x^{2}+f \right ) \pi \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right )}{4 g}+\frac {\ln \left (g \,x^{2}+f \right ) \ln \left (c \right )}{2 g}\) \(472\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*ln(c*(e*x^2+d)^p)/(g*x^2+f),x,method=_RETURNVERBOSE)

[Out]

1/2/g*ln(g*x^2+f)*ln((e*x^2+d)^p)-1/2/g*p*sum(ln(x-_alpha)*ln(g*x^2+f)-ln(x-_alpha)*(ln((RootOf(_Z^2*e*g+2*_Z*
_alpha*e*g-d*g+e*f,index=1)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1))+ln((RootOf(_Z^2*e*g+2*
_Z*_alpha*e*g-d*g+e*f,index=2)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)))-dilog((RootOf(_Z^2
*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1))-dilog((RootO
f(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)),_alpha
=RootOf(_Z^2*e+d))+1/4*I/g*ln(g*x^2+f)*Pi*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)^2-1/4*I/g*ln(g*x^2+f)*Pi*c
sgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)*csgn(I*c)-1/4*I/g*ln(g*x^2+f)*Pi*csgn(I*c*(e*x^2+d)^p)^3+1/4*I/g*ln(g
*x^2+f)*Pi*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)+1/2/g*ln(g*x^2+f)*ln(c)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs. \(2 (70) = 140\).
time = 0.32, size = 146, normalized size = 2.09 \begin {gather*} \frac {{\left (e^{\left (-1\right )} \log \left (g x^{2} + f\right ) \log \left (x^{2} e + d\right ) - {\left (\log \left (g x^{2} + f\right ) \log \left (\frac {g x^{2} e + f e}{d g - f e} + 1\right ) + {\rm Li}_2\left (-\frac {g x^{2} e + f e}{d g - f e}\right )\right )} e^{\left (-1\right )}\right )} p e}{2 \, g} - \frac {p \log \left (g x^{2} + f\right ) \log \left (x^{2} e + d\right )}{2 \, g} + \frac {\log \left (g x^{2} + f\right ) \log \left ({\left (x^{2} e + d\right )}^{p} c\right )}{2 \, g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*log(c*(e*x^2+d)^p)/(g*x^2+f),x, algorithm="maxima")

[Out]

1/2*(e^(-1)*log(g*x^2 + f)*log(x^2*e + d) - (log(g*x^2 + f)*log((g*x^2*e + f*e)/(d*g - f*e) + 1) + dilog(-(g*x
^2*e + f*e)/(d*g - f*e)))*e^(-1))*p*e/g - 1/2*p*log(g*x^2 + f)*log(x^2*e + d)/g + 1/2*log(g*x^2 + f)*log((x^2*
e + d)^p*c)/g

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*log(c*(e*x^2+d)^p)/(g*x^2+f),x, algorithm="fricas")

[Out]

integral(x*log((x^2*e + d)^p*c)/(g*x^2 + f), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{f + g x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*ln(c*(e*x**2+d)**p)/(g*x**2+f),x)

[Out]

Integral(x*log(c*(d + e*x**2)**p)/(f + g*x**2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*log(c*(e*x^2+d)^p)/(g*x^2+f),x, algorithm="giac")

[Out]

integrate(x*log((x^2*e + d)^p*c)/(g*x^2 + f), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )}{g\,x^2+f} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*log(c*(d + e*x^2)^p))/(f + g*x^2),x)

[Out]

int((x*log(c*(d + e*x^2)^p))/(f + g*x^2), x)

________________________________________________________________________________________